Skip Headers
Oracle® Enterprise Manager Cloud Control Getting Started with Oracle Fusion Middleware Management
12c Release 3 (12.1.0.3)

Part Number E24215-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

9 Overview of Oracle GlassFish Server Management

Oracle GlassFish Server (GlassFish Server) provides the server environment needed for the development and deployment of Java Platform, Enterprise Edition (Java EE platform) applications and web technologies based on Java technology.

Enterprise Manager Cloud Control provides the ability for you to monitor Oracle GlassFish Domains, Servers, and Clusters.

This chapter provides the following:

9.1 Before Getting Started

Before you start using Oracle GlassFish, ensure you are familiar with the Oracle GlassFish concepts. Refer to the Oracle GlassFish Server documentation available at http://www.oracle.com/technetwork/middleware/glassfish/documentation/index.html

Also, ensure you have been granted the roles and privileges needed to use Oracle GlassFish.

9.1.1 GlassFish Roles and Privileges

Before you start using Oracle GlassFish, ensure you have access to the following privileges:

Task Privilege
Start and stop GlassFish targets FMW_PROCESS_CONTROL_TARGET; CREATE_JOB
View start, stop, and restart menus FMW_PROCESS_CONTROL_TARGET
Use start, stop, and restart menus CREATE_JOB
Discovery and refresh CREATE_PROPAGATING_GROUP

9.1.2 Adding Domain Certificate to Activate Start and Stop Operations

To start or stop Oracle GlassFish targets, you must manually export the domain certificate from the Oracle Glassfish domain for which you want to perform start and stop operations and add it to the AgentTrust.jks file of the Agent which is used to monitor that domain.

Perform the following steps to add the certificate. The first step extracts the Oracle GlassFish domain certificate to a temporary certificate file (server.cer). The second step adds this certificate to the Agent trust store.

  1. This step should be run on the host where the Oracle GlassFish domain is installed, then copy this server.cer file to the Agent host.

    keytool -keystore  <GlassFish Domain>/config/cacerts.jks  -export -alias 
    <alias> -file <file> -noprompt -storepass <password>
    
    Where:
    <GlassFish Domain> - Domain where file is located
    <alias> - Alias of Oracle Glassfish domain certificate in cacerts.jks (Default is s1as)
    <password> - Password for cacerts.jks (Default is changeit)
    <file> - Temporary certificate file to which domain certificate is added, 
    for example, server.cer
    
  2. Import the Certificate to the AgentTrust.jks file using the keytool or emctl commands. This should be run on the Agent.

    keytool -import -alias <alias> -file <file> 
    -keystore $T_WORK/agentStateDir/sysman/config/montrust/AgentTrust.jks 
    -noprompt -storepass <password>
    
    Where:
    <alias> - alias for the certificate to import
    <file> - temporary file to which certificate was exported in step 1
    <password> - password to the AgentTrust.jks file
    
    
    OR
    
    emctl secure add_trust_cert_to_jks [-password <password> 
    -trust_certs_loc <loc> -alias <alias>]
    
    Where:
    <password> - password to the AgentTrust.jks file
    <loc> - location of the certificate(certificate.cer) file to import
    <alias> - alias for the certificate to import
    

9.2 Understanding the Oracle GlassFish Domain

As a GlassFish Server Administrator, you can use the GlassFish Domain home page to understand the overall health of the GlassFish Domain. This home page provides summary information about the domain, as well as specifics about clusters and servers.

Note:

You will see errors if you do not have the server or cluster configured to enable the monitoring attributes and/or component monitoring levels required by Enterprise Manager. To collect and view metrics in Enterprise Manager, monitoring must be enabled on the servers. Go to the GlassFish Server Administration Console and click the Configure Monitoring link for each server. Ensure that both the Monitoring Service and Monitoring MBeans are enabled.

In addition, ensure the Monitoring Level is set to HIGH for the following components:

  • Connector Connection Pool

  • Connector Service

  • EJB Container

  • JDBC Connection Pool

  • JMS Service

  • JVM

  • Transaction service

  • Web Container

Note: At the top of the page, the host that appears above the timestamp is the host of the agent monitoring the target. This may or may not be the Administration Server host.

Summary

The Summary section provides general information about the domain, link to the GlassFish Server Administration Console, and monitoring and diagnostics statistics.

Clusters

If the domain contains clusters, this region lists the clusters. If the domain does not contain clusters, the table appears with the message "No Clusters Found".

For each cluster, the name, status, servers, and incidents fields appear.

Servers

The domain home page lists all servers that are contained within the domain, including servers that are contained within any clusters in the domain.

For each server, the name, status, host, associated cluster, configuration data, as well as performance data appear. For additional information regarding a server, click the server name.

Domain Target Menu

The domain home page provides a menu of additional functions you can perform from this page. The menu is located under the name of the domain.

Menu options of particular interest are:

9.2.1 How to Access an Oracle GlassFish Domain

To access the Oracle GlassFish Domain home page, perform the following steps:

  1. From the Targets menu, select Middleware.

  2. On the Middleware page, select Oracle GlassFish Full Hierarchy in the Area field and click Search. In the table, click the GlassFish Domain in which you are interested. The GlassFish Domain page appears.

On this page, you can:

  • Easily access the GlassFish Server Administration Console to make configuration changes to the domain and perform administration operations.

  • Start up and shut down all servers and clusters except for the Domain Administration Server.

  • Blackout the domain when the domain must go down for maintenance. By blacking out the domain, alert notifications are not sent. Click Create Blackout... at the top of the page to access this functionality. You can also use the GlassFish Domain menu: from the Control menu, select Create Blackout....

  • Customize the layout and data displayed in target home pages. The changes you make are persisted for all targets' home pages of the particular target type you are customizing and are persisted for the user you are currently logged in as; this enables you to create customized consoles for monitoring various target types.

  • Refresh the domain after creating a new server or deploying a new application. This enables you to see the most up-to-date information on this page.

  • Perform configuration management operations such as viewing and analyzing collected configuration data, comparing configurations between servers, tracking configuration changes over time, and searching configuration data across the enterprise.

9.2.2 How to Add an Oracle GlassFish Domain To Be Monitored

There are two ways to access the functionality to add an Oracle GlassFish Domain to Enterprise Manager Cloud Control.

If you need to discover several domains, consider using the Enterprise Manager Command Line Interface (EMCLI). This allows you to discover multiple domains in one operation. See the Oracle Enterprise Manager Command Line Interface manual for additional information.

Method 1

  1. From the Targets menu, select Middleware.

  2. Click the Add button, then select Oracle GlassFish Domain.

  3. On the Add GlassFish Domain: Find Targets page, provide the required information denoted by an asterisk. Click Continue.

  4. Reassign the agents.

Method 2

  1. From the Enterprise Manager Setup menu located at the top right of the screen, select Add Target, then select Add Targets Manually.

  2. On the Add Targets Manually page, select Add Targets Using Guided Process (Also Adds Related Targets).

  3. In the Target Type menu, select Oracle GlassFish Domain.

  4. Then click the Add Using Guided Process button.

  5. On the Add GlassFish Domain: Find Targets page, provide the required information denoted by an asterisk. Click Continue.

  6. Reassign the agents.

9.2.3 Adding an Oracle GlassFish Domain: Finding and Assigning Targets

After adding the domain to the Cloud Control console, consider performing the following tasks:

  • Configure notification methods and your notification schedule to receive email and page notifications when potential problems occur, for example, GlassFish Server goes down unexpectedly, key performance metric threshold is reached, and so on.

  • Create a monitoring template for GlassFish related components to set thresholds for key performance metrics and collection frequency of configuration and monitoring data. You can then apply this template to several GlassFish components to ensure that all components are monitored in a similar fashion.

Before you can add (discover) an Oracle Glassfish Domain as a managed target, you must provide the information Cloud Control requires to find the targets associated with the domain. Provide the required information as follows:

Field Description
Administration Server Host Name of the Domain Administration Server Host. Select a host from the list provided. This is the host name for where the Administration Server is installed and running.

Ensure that the Administration Server is up and accessible prior to initiating discovery. While the Administration Server must be up in order to perform discovery, it need not remain up for Cloud Control to monitor the availability and performance of the domain and its members. However, any time you want to refresh the domain (that is, rediscover the domain to begin monitoring newly created components or to remove recently removed components), you must ensure that the Administration Server is up.

Port Administration Server Host port number. The default port number is 4848. This is the port on which the Administration Server is listening. The default port in the Discovery UI is 7001.

If the port is configured for the HTTPS protocol only, then you must also specify 'HTTPS' as the protocol in the Advanced section of this page. For discovering secure domain, use the https protocol.

If the agent needs to be secured, use emctl. If the default demo certificate, or a self-signed certificate is being used on the GlassFish Servers for t3s/iiops, then the Root CA certificate for this must be added to the AgentTrust.jks in order for the Agent to be able to discover and monitor these GlassFish Servers and Java EE applications using t3s. An emctl command is provided for this purpose.

emctl secure add_trust_cert_to_jks [-password <password> -trust_certs_loc <loc> -alias <alias>]

where

  • alias - alias for the cert to import

  • password - password to the AgentTrust.jks (if not specified will be prompted for)

  • trust_certs_loc - location of the cert file to import

Username User name of the Administration Server Domain. User needs CREATE_PROPAGATING_GROUP privilege for discovery/refresh.
Password Password of the Administration Server Domain
Unique Domain Identifier Used as a prefix to ensure domain names are unique in environments with the same domain name. For example, if the Unique Domain Identifier is Domain01 and the domain name is production_domain then the domain name in Enterprise Manager would be Domain01_production_domain.

The default Unique Domain Identifier is Domain01. This identifier is incremented each time an additional domain is discovered. For example, if you discover a domain with the name stage_domain, then the domain name in Enterprise Manager is Domain02_stage_domain.

You can change the default identifier. However, the identifier must only contain alphanumeric characters and the special character '_'. No other special characters can be used in the identifier.

Agent Agent used to discover the target; that is, the agent used to connect to the GlassFish Administration Server.

The specified Management Agent can be local to the Administration Server (that is, installed on the same host machine as the Administration Server) or can be remote to the Administration Server (that is, installed on a different host machine as the Administration Server). The Management Agent uses the REST Interface to connect to the Administration Server (thus, requiring the Administration Server to be up) in order to discover the details of the domain and its members.

This agent does not have to be the same agent that is used for monitoring. Typically, when you discover a target, you select the agent local to the GlassFish Administrator Server. When you choose the agent for monitoring, you choose the local agent to each managed server. If there is no local agent to each managed server, then by default, the agent used for discovery is used.

You can choose the agent from the drop-down list. The agent must be a version 12.1 Management Agent.


In the Advanced Section, provide additional information for discovering and assigning targets.

Field Description
Protocol Use either http or https to make the connection to the Administration Server. The default value for the Protocol field is http.
Service URL Connection string used to make a JMX connection to the GlassFish domain.
External Parameters Optional field for passing parameters to the Java process used for connecting to the Administration Server. These parameters must begin with -D.

You can name value pairs which are separated by a space ( ), such as -Dkerborosekey=a -Dparam2=b -Dparam3=c. For example: -Dname=foo -Dparam1=abcd

Discovery Debug File Name The agent side discovery messages for this session will be logged into this file. This file will be generated in the discovery agent's log directory <agent home>/sysman/log. If this file already exists, it will be updated.

Once you have provided all the information, click Continue.

A processing page appears indicating that Enterprise Manager is attempting to find targets. When processing is complete, the processing page displays the number of targets found. The Assign Agents page displays.

Note: If the process of discovering or refreshing a farm fails because the system has reached the maximum number of HTTP socket connections, you must edit the emd.properties file and increase the MaxInComingConnections parameter to 500. After you make the change then bounce the agent.

Assigning Agents

The agents will be assigned automatically. If a local agent is found where a server is running, that agent is assigned. Otherwise the agent that you entered in the Find Targets page is assigned.

The Saving Target to Agent processing window appears indicating how many total targets have been added and successfully saved. It will also indicate the number of targets were unsuccessfully added.

If there are no warnings due to a failure to assign agents, the Show/Hide section is hidden by default. If there are any warnings, the Show/Hide section will automatically expand to display the Results table.

If the targets of the domain change in the future, you can use the Refresh Domain option to add or remove targets.

After Discovery

After adding the domain to the Cloud Control console, consider performing the following tasks:

  • Configure notification methods and your notification schedule to receive email and page notifications when potential problems occur, for example, GlassFish Server goes down unexpectedly, key performance metric threshold is reached, and so on.

  • Create a monitoring template for GlassFish related components to set thresholds for key performance metrics and collection frequency of configuration and monitoring data. You can then apply this template to several GlassFish components to ensure that all components are monitored in a similar fashion.

Notes

  • If the process of discovering or refreshing a domain fails because the system has reached the maximum number of HTTP socket connections, you must edit the emd.properties file and increase the MaxInComingConnections parameter to 500. After you make the change, bounce the agent.

  • When a user discovers a secure GlassFish Domain with a custom certificate, they also must import the certificate to the agent trust store of the following agents:

    • In the discovery agent

    • In all the agents used for monitoring the targets which belong to that GlassFish Domain

  • If a local Management Agent is found on the same host machine as a GlassFish Server within the domain, then that agent is automatically assigned to monitor the GlassFish Server.

  • If there are any validation errors in the discovery process, errors will display in a message box. Similarly, if agents to which targets are being pushed are down at the time of discovery, an error message displays stating that the operation for that target will fail.

  • You can easily change the monitoring configuration of a target. For more information, see Modifying the Monitoring Configuration of a Target.

  • You can refresh an existing domain by using the Refresh GlassFish Domain option on the GlassFish Domain menu.

9.2.4 Adding an Oracle GlassFish Domain: Displaying Results

After the Assign Agents page displays the number of targets discovered, you can use Cloud Control to display the targets that have been discovered in the domain. The Results page may indicate that all targets have been successfully added or that the process was partially successful. The Results page lists the number of successful targets along with the number of unsuccessful targets. You have the option of retrying targets with errors by using the Retry Targets with Errors feature.

If there were no warnings due to a failure to assign agents, the Show/Hide section is hidden by default. If there are any warnings, the Show/Hide section will automatically expand to display the Results table.

The Results table lists the Target, Type, Host, Configured Agent, and Status. The targets are displayed in an expanded hierarchy. If you had selected the option to manually assign an agent to a target, you can enter the agent in the Configured Agent field. Otherwise if a local agent is found where a server is running, that agent is assigned or the agent that you entered in the Find Targets page is assigned.

You can change the agent only for targets to which you can assign an agent. You cannot modify the monitoring agent of targets that use a parent agent such as J2EE applications, soa-infra, and so on.

The Status column displays the results of each target and displays the following values:

  • Success (Green check mark) -- Target is pushed to the agent successfully

  • Failure (Red X) -- Failed to push target to agent

  • Already Saved -- Target already saved

If agents to which targets are being pushed are down at the time of discovery, an error message displays stating that the operation for that target will fail.

When all processing completes, you can choose to fix any issues caused by targets not being added because of errors related to agent assignments by pressing the Retry Targets with Errors button. The Retry Targets with Errors window appears. A scrollable table displays showing each target that was not added due to errors. Often targets are not added because agents were not started at the time of discovery. You can either change the agent in the Agent field or simply click Retry to initiate the process again.

Alternatively, you can leave this page and return later to address any issues. If you press Cancel, all targets that have been discovered will be monitored by Cloud Control and the Middleware page is then displayed.

Note: If the process of discovering or refreshing a domain fails because the system has reached the maximum number of HTTP socket connections, you must edit the emd.properties file and increase the MaxInComingConnections parameter to 500. After you make the change then bounce the agent.

9.2.5 Refreshing an Oracle GlassFish Domain

Enterprise Manager is not informed when changes are made to the domain configuration and membership. For example, if someone using the GlassFish Server Administration Console adds a new managed server, removes a server, adds a cluster, removes a cluster, and so on, Enterprise Manager does not know about the changes until the target is refreshed or rediscovered. It is only then that Enterprise Manager knows of the newly added targets and you can add them to Enterprise Manager for centralized management and monitoring.

By using Enterprise Manager, you are informed when target members are removed. You can remove these targets from Enterprise Manager. It is by design that Enterprise Manager does not automatically remove the targets.

When you refresh the domain, historical data is not lost unless you choose to delete a target that has been removed outside of Enterprise Manager. When new members are found, you must choose the agent to monitor them.

To manually refresh the GlassFish Domain to ensure you are monitoring the complete domain, follow these steps.

  1. On the GlassFish Domain page, locate the GlassFish Domain menu.

  2. From the menu, select Refresh GlassFish Domain.

9.3 Understanding the Oracle GlassFish Server Home Page

As a GlassFish Server Administrator, you can review the GlassFish Server home page to understand the overall health of the GlassFish Server. The GlassFish Server home page provides summary information about the server, and statistics regarding the most requested servlets and response and load.

The home page provides the following:

Summary

This section provides general information about the server, link to the GlassFish Server Administration Console, monitoring and diagnostics statistics, and so on.

Most Requested Servlets

This region lists the servlets that have had requests during the past 24 hours.

Response and Load

Shows the request processing time and requests per minute of all servlets over time.

GlassFish Server Menu

The server home page provides a menu of additional functions you can perform from this page. The menu is located under the name of the server.

Menu options of particular interest are:

9.3.1 How to Access an Oracle GlassFish Server

To access the Oracle GlassFish Server home page, perform the following steps:

  1. From the Targets menu, select Middleware.

  2. On the Middleware page, select Oracle GlassFish Full Hierarchy in the Area field and click Search. In the table, expand the Oracle GlassFish Domain node that contains the GlassFish Server of interest. Click the GlassFish Server and the GlassFish Server home page appears.

This page provides a summary of the server's health, as well as key performance indicators for the server, like Enterprise JavaBeans (EJBs) and Java Message Service (JMS).

In addition, you can:

  • Easily access the GlassFish Server Administration Console (in the Summary region) to make configuration changes to the server and perform administration operations. Click the link, then log in with your user name and password.

  • Create and end blackouts.

    Blackouts allow Enterprise Manager users to suspend management data collection activity on one or more managed targets. For example, administrators use blackouts to prevent data collection during scheduled maintenance or emergency operations. By blacking out the server, alert notifications are not sent.

  • Start up, shut down, and restart servers.

    These operations call predefined jobs that perform the operations. Credentials are needed for each of these operations.

  • Customize the layout in target home pages. For example, you can customize the page to show particular GlassFish Server metrics.

    For more information, see Personalizing a Cloud Control Page.

  • View historical performance metrics from the GlassFish Server menu by selecting Monitoring, then selecting Performance Summary. You can customize the Performance Summary page.

  • Customize the layout and data displayed in target home pages. The changes you make are persisted for all targets' home pages of the particular target type you are customizing and are persisted for the user you are currently logged in as; this enables you to create customized consoles for monitoring various target types.

  • Perform configuration management operations such as viewing and analyzing collected configuration data, comparing configurations between servers, tracking configuration changes over time, and searching configuration data across the enterprise.

9.4 Understanding the Oracle GlassFish Cluster Home Page

As a GlassFish Server Administrator, you can review the GlassFish Cluster home page to understand the overall health of the GlassFish Cluster by way of its status as well as its key performance and configuration data.

The home page provides the following:

Summary

The Summary section provides general information about the cluster, link to the GlassFish Server Administration Console, and monitoring and diagnostics statistics.

Servers

The domain lists all servers that are contained within the cluster.

For each server, the name, status, host, configuration data, as well as performance data appear. For additional information regarding a server, click the server name.

Resource Usage

Shows the CPU usage over time and the Heap Usage over time graphs for every server the cluster contains.

GlassFish Cluster Target Menu

The cluster home page provides a menu of additional functions you can perform from this page. The menu is located under the name of the cluster.

Menu options of particular interest are:

9.4.1 How to Access an Oracle GlassFish Cluster

To access the Oracle GlassFish Cluster home page, perform the following steps:

  1. From the Targets menu, select Middleware.

  2. On the Middleware page, select Oracle GlassFish Full Hierarchy in the Area field and click Search. In the table, click the GlassFish Cluster in which you are interested. The GlassFish Cluster home page appears.

On this page, you can:

  • Easily access the GlassFish Server Administration Console (in the Summary region) to make configuration changes to the cluster and perform administration operations. Click the link, then log in with your user name and password.

  • You can customize the layout and data displayed in target home pages to suit your specific needs. The changes you make are for a target type and user.

    For more information, see Personalizing a Cloud Control Page.

9.5 Viewing Collected Configuration Data for Oracle GlassFish Members

Configuration data is available for Oracle GlassFish Domains, clusters, and servers. To view the configuration data:

  1. From the Targets menu, select Middleware.

  2. On the Middleware page, select Oracle GlassFish in the Area field and click Search. In the table, click the target of interest, that is, a GlassFish Domain, cluster, or server.

  3. On the resulting page, click the menu located under the page title, for example, GlassFish Server, GlassFish Domain, or GlassFish Cluster.

  4. Select Configuration, then select Last Collected.

In addition to viewing the Last Collected data, from the Configuration menu you can:

9.6 Creating an Oracle GlassFish Server Configuration Comparison Template

Enterprise Manager provides a monitoring template for GlassFish which you can customize. For example, you can set metric thresholds and collection frequency (for both performance and configuration data), and then apply these settings in the template to several servers of the domain or across several domains.

This ensures a consistent way of monitoring across targets and eliminates the need to go to each server to specify thresholds and collection settings.

To create a configuration comparison template, perform these steps:

  1. From Enterprise menu, select Configuration, then Comparison Templates.

  2. Click the Help button located at the top right of the page for information on how to create a new comparison template.